From: Georges Basile Stavracas Neto Date: Sat, 4 Feb 2023 18:00:28 +0000 (-0300) Subject: status/network: Set default name for toggle title X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~405^2^2~88 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=707ce2955b54c6de0a8b8b144ffc52c9ecad87b5;p=gnome-shell.git status/network: Set default name for toggle title Following the previous commits where we left the quick toggle title open for the new title scheme, set the titles for all network pills to what currently is the "default" name. That means, we pull the device name from Network Manager for devices, through the disambiguate function, and hardcode 'VPN' for VPN connections. Part-of: --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 7057241a1..781e298a4 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -1318,6 +1318,10 @@ const NMToggle = GObject.registerClass({ this._itemBinding = new GObject.BindingGroup(); this._itemBinding.bind('icon-name', this, 'icon-name', GObject.BindingFlags.DEFAULT); + this._itemBinding.bind_property_full('source', + this, 'title', GObject.BindingFlags.DEFAULT, + () => [true, this._getDefaultName()], + null); this._itemBinding.bind_full('name', this, 'subtitle', GObject.BindingFlags.DEFAULT, (bind, source) => [true, this._transformSubtitle(source)],